public class Test {
    public static void main(String[] args) {
        MyArraylist myArraylist = new MyArraylist();
        myArraylist.add(5);
        myArraylist.add(4);
        myArraylist.add(3);
        myArraylist.add(2);
        myArraylist.add(1);

        myArraylist.display();// 5 4 3 2 1

        myArraylist.add(0, 6);
        myArraylist.display();//6 5 4 3 2 1

        System.out.println(myArraylist.contains(4));//true

        System.out.println(myArraylist.indexOf(5));//1

        System.out.println(myArraylist.get(3));//3

        myArraylist.set(2, 78);
        myArraylist.display();//6 5 78 3 2 1

        myArraylist.remove(3);
        myArraylist.display();//6 5 78 2 1

        System.out.println(myArraylist.size());//5

        myArraylist.clear();
        myArraylist.display();
    }
}
